var React = require('react-native');
var {NativeModules} = React;
var AlertAndroidModule = NativeModules.AlertAndroidModule;


/**
 * 暴露出来Android的alert方法，为什么还要做一层封装呢？
 * 我们尽量保证和AlertIOS的api保持兼容
 */
exports.alert = (title, msg, params) => {
  var text1 = params[0].text;
  var callback1 = params[0].onPress;

  var text2 = params[1].text;
  var callback2 = params[1].onPress;

  AlertAndroidModule.alert(title, msg, text1, text2, callback1, callback2);
};
